package p.ithorns.integration.hz.core;

import com.hazelcast.map.EntryProcessor;
import lombok.extern.slf4j.Slf4j;

import java.util.Map;

/**
 * SumEntryProcessor
 * TODO ithorns
 *
 * @author Ht.L
 * @date 2023-11-21 09:56
 * @since 1.0.0
 */
@Slf4j
public class SumEntryProcessor implements EntryProcessor<String, Integer, Void> {

    @Override
    public Void process(Map.Entry<String, Integer> entry) {
        Integer value = entry.getValue();
        value = (value != null) ? value : 0;
        log.info("对数据执行计算： {}", value);
        return null;
    }

}